package com.zhida.jiyangcenter.api

import chooongg.base.manager.app
import chooongg.http.HttpManager
import com.zhida.jiyangcenter.utils.SP
import retrofit2.converter.gson.GsonConverterFactory
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.POST

interface APIFamous {
    companion object {
        fun service() =
            HttpManager.create(app.applicationContext, "http://beauty.hebzd.com/api/famous_api/") {
                addConverterFactory(GsonConverterFactory.create())
            }.getAPI(APIFamous::class.java)
    }

    /**
     *名医健康方案主页
     */
    @GET("list")
    suspend fun list(): NetResponse<List<FamousListEntity>>

    /**
     *名医健康方案详情
     */
    @POST("details")
    @FormUrlEncoded
    suspend fun details(@Field("program_id") program_id: String): NetResponse<FamousDetailsEntity>

}